{include file="header/index" /}

<style>

</style>
<div class="newContentBox">
	<div class="fixedFather">
			<div class="fix">
					新增订单
					<span class="newNotice"><span class="newtext">*</span>为必填项</span>
					<div class="newFixBtnBox">
							<button type="button" class="newBtnDefault newBtnGray" onclick="returnBack(this)"> <i class="fa fa-mail-reply"></i>返回</button>
					</div>
			</div>
	</div>
	
	<form action="" class="layui-form newListPart ">
		<div class="newPart">
				<div class="newTitle">
						<i class="fa fa-address-book allColor icon"></i>	客户信息
				</div>
				<div class="newContent">
						<div class="layui-form-item cover_layui_f_i">
							<label class="layui-form-label cover_layui_f_l"><span class="cover_new_label">*</span> input框</label>
							<div class="layui-input-block cover_layui_i_b">
								<input type="text" name="title" required  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
								<span class="lookIcon">查看</span>
							</div>	
						</div>
						<div class="layui-form-item cover_layui_f_i">
							<label class="layui-form-label cover_layui_f_l"><span class="cover_new_label">*</span> select框</label>
							<div class="layui-input-block cover_layui_i_b">
								<select name="" id="">
									<option value="1">选择一</option>
									<option value="2">选择二</option>
									<option value="3">选择三</option>									
								</select>
							</div>
						</div>
						<div class="layui-form-item cover_layui_f_i">
							<label class="layui-form-label cover_layui_f_l"><span class="cover_new_label">*</span> input框</label>
							<div class="layui-input-block cover_layui_i_b">
								<input type="text" name="title" required  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
								<span class="lookIcon">查看</span>
							</div>	
						</div>
						<div class="layui-form-item cover_layui_f_i">
							<label class="layui-form-label cover_layui_f_l"><span class="cover_new_label">*</span> input框</label>
							<div class="layui-input-block cover_layui_i_b">
								<input type="text" name="title" required  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
								<span class="lookIcon">查看</span>
							</div>	
						</div>
						<div class="layui-form-item cover_layui_f_i">
								<label class="layui-form-label cover_layui_f_l"><span class="cover_new_label">*</span>原始复选框</label>
								<div class="layui-input-block cover_layui_i_b">
									<input type="checkbox" name="like1[write]" lay-skin="primary" title="写作" checked="">
									<input type="checkbox" name="like1[read]" lay-skin="primary" title="阅读">
									<input type="checkbox" name="like1[game]" lay-skin="primary" title="游戏" disabled="">
								</div>
						</div>
						<div class="layui-form-item cover_layui_f_i">
								<label class="layui-form-label cover_layui_f_l"><span class="cover_new_label">*</span>单选框</label>
								<div class="layui-input-block cover_layui_i_b">
									<input type="radio" name="sex" value="男" title="男" checked="">
									<input type="radio" name="sex" value="女" title="女">
								</div>
						</div>
						<div class="layui-form-item cover_layui_f_i">
								<label class="layui-form-label cover_layui_f_l"><span class="cover_new_label">*</span>日期选择</label>
								<div class="layui-input-block cover_layui_i_b">
									<input type="text" name="date" id="date1" autocomplete="off" class="layui-input newDate cover_date">
								</div>
						</div>
						<div class="layui-form-item cover_layui_f_i">
								<label class="layui-form-label cover_layui_f_l"><span class="cover_new_label">*</span>时间选择</label>
								<div class="layui-input-block cover_layui_i_b">
									<input type="text" name="date" id="time" autocomplete="off" class="layui-input newDate cover_time">
								</div>
						</div>
						
						<div class="layui-form-item cover_layui_f_i">
								<label class="layui-form-label cover_layui_f_l"><span class="cover_new_label">*</span>三级联动</label>
								<div class="layui-input-inline">
									<select name="quiz1">
										<option value="">请选择省</option>
										<option value="浙江" selected="">浙江省</option>
										<option value="你的工号">江西省</option>
										<option value="你最喜欢的老师">福建省</option>
									</select>
								</div>
								<div class="layui-input-inline">
									<select name="quiz2">
										<option value="">请选择市</option>
										<option value="杭州">杭州</option>
										<option value="宁波" disabled="">宁波</option>
										<option value="温州">温州</option>
										<option value="温州">台州</option>
										<option value="温州">绍兴</option>
									</select>
								</div>
								<div class="layui-input-inline">
									<select name="quiz3">
										<option value="">请选择县/区</option>
										<option value="西湖区">西湖区</option>
										<option value="余杭区">余杭区</option>
										<option value="拱墅区">临安市</option>
									</select>
								</div>					
						</div>
						<div class="layui-form-item layui-form-text cover_layui_f_i">
							<label class="layui-form-label cover_layui_f_l"><span class="cover_new_label">*</span>文本域</label>
							<div class="layui-input-block cover_layui_i_b">
								<textarea placeholder="请输入内容" class="layui-textarea layui-input" name="desc"></textarea>
							</div>
						</div>
						<div class="layui-form-item cover_layui_f_i">
							<label class="layui-form-label cover_layui_f_l"><span class="cover_new_label">*</span>单图上传</label>
							<div class="layui-input-block cover_layui_i_b layui-upload">
									<button type="button" class="layui-btn newBtnPrimary" id="uploadOne">上传图片</button>
									<div class="layui-upload-list">
											<div class="uploadImg">
												<img src="" alt="">
												<div class="remove" onclick="removeImg(this)"><i class="fa fa-times"></i></div>
											</div>
									</div>
							</div>
						</div>
						<div class="layui-form-item cover_layui_f_i">
							<label class="layui-form-label cover_layui_f_l"><span class="cover_new_label">*</span>多图上传</label>
							<div class="layui-input-block cover_layui_i_b layui-upload">
									<button type="button" class="layui-btn newBtnPrimary" id="uploadMore">上传图片</button>
									<div class="layui-upload-list">
											<div class="uploadImg">
												<img src="" alt="">
												<div class="remove" onclick="removeImg(this)"><i class="fa fa-times"></i></div>
											</div>
											<div class="uploadImg">
												<img src="" alt="">
												<div class="remove" onclick="removeImg(this)"><i class="fa fa-times"></i></div>
											</div>
											<div class="uploadImg">
												<img src="" alt="">
												<div class="remove" onclick="removeImg(this)"><i class="fa fa-times"></i></div>
											</div>
									</div>
							</div>
						</div>	 
				</div>
				<div class="layui-form-item">
						<label class="layui-form-label cover_layui_f_l"><span class="cover_new_label">*</span>富文本编辑器</label>
						<div class="layui-input-block cover_layui_i_b cover_layui_i_b_text">
								<textarea class="layeditDemo" style="display: none;width: 300px"></textarea>
						</div>
				</div>
				<div class="layui-form-item ">
					<div class="layui-input-block cover_layui_i_b">
						<button class="layui-btn newBtnDefault newBtnPrimary" lay-submit lay-filter="formDemo">保存</button>
						<button type="reset" class="layui-btn newBtnDefault">重置</button>
					</div>
				</div>
		</div>
			
	</form>

</div>


<script>
var layer = layui.layer,
		element = layui.element,
		laydate = layui.laydate,
		laypage = layui.laypage,
		form = layui.form,
		upload = layui.upload,
		layedit = layui.layedit;
form.render();
$('.cover_date').each(function(){
	laydate.render({
		elem: this,
	})
})
$('.cover_time').each(function(){
	laydate.render({
		elem: this,
		type: 'time'
	})
})
	
// 单图上传
var uploadOne = upload.render({
    elem: '#uploadOne'
    ,url: '/upload/'
    ,done: function(res){
      //如果上传失败
      if(res.code > 0){
        return layer.msg('上传失败');
      }else{
				var html = '<div class="uploadImg">'
								 +'			<img src="" alt="">'
								 +'			<div class="remove" onclick="removeImg(this)"><i class="fa fa-times"></i></div>'
								 +'		</div>'
				$("uploadOne").next('.layui-upload-list').html(html);
			}
      //上传成功
    }
    ,error: function(){
      layer.msg('上传失败', {icon: 2})
    }
  });
	
// 多图上传
var uploadMore = upload.render({
	elem: '#uploadMore'
	,url: '/upload/'
	,multiple: true
	,done: function(res){
		//如果上传失败
		if(res.code > 0){
			return layer.msg('上传失败');
		}else{
			var html = '<div class="uploadImg">'
								+'			<img src="" alt="">'
								+'			<div class="remove" onclick="removeImg(this)"><i class="fa fa-times"></i></div>'
								+'		</div>'
			$("uploadMore").next('.layui-upload-list').append(html);
		}
		//上传成功
	}
	,error: function(){
		layer.msg('上传失败', {icon: 2})
	}
})

// 富文本编辑器样式
$('.layeditDemo').each(function(){
	layedit.build(this,{height: 500}); 
})

</script>